<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateActivityRedEnvelope extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activity_red_envelope', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('cityid')->comment('城市id');
            $table->integer('agentuserid')->comment('代理商ID');
            $table->decimal('accountamount', 16, 2)->default(0.00)->comment('结算金额');
            $table->dateTime('accounttime')->comment('结算时间');
            $table->string('accountmonth')->default('')->comment('结算月份');
            $table->decimal('balance', 16, 2)->default(0.00)->comment('提现后的余额');
            $table->tinyInteger('status')->default(0)->comment('状态');
            $table->integer('adminid')->default(0)->comment('操作人id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
